import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import set from '@dfeidao/atom-web/local/set';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import render from '@dfeidao/atom-web/render/render';
import set_node_cls from '@dfeidao/atom-web/ui/set-node-cls';
import p001 from './p001';

export default async function a001(fd: IFeidaoAiBrowserComponent, flag: string) {// 显示隐患源特性集弹窗
	// todo
	console.log('zj-000009:a001----start');
	// 显示隐患源特性集弹窗
	fd.data.node.style.display = 'block';
	const n = fd.data.node.querySelector<HTMLDivElement>('[data-id="feature"]');
	set_node_cls(n, 'display-n', false);
	// 初始化渲染数据
	const page_no = '1';
	const res = await nodejs('wyf-hManager/zj-000009/s001', {
		filter: {
			hidden_source_feature_name: '',
			pn: Number(page_no)/*显示第几页的数据 */
		}
	});
	console.log('zj-000009', res);
	render(fd, res, p001, 'p001', 'inner');

	set(fd, 'flag', flag);// 保存新增或修改标志

	console.log('zj-000009:a001----end');
}
